package org.zhxy.zhxy.exception;

import lombok.Getter;

/**
 * @description: 异常处理枚举类
 * @version: v1.0
 */
@Getter
public enum ExceptionEnum {
    
    // 数据操作错误定义
    SUCCESS(200, "成功!"),
    BODY_NOT_MATCH(400,"请求的数据格式不符!"),
    UNAUTHORIZED(401,"Token不匹配!"),
    NOT_FOUND(404, "未找到该资源!"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误!"),
    SERVER_BUSY(503,"服务器正忙，请稍后再试!"),
    WX_NOT_BOUND(502,"微信未绑定!");

    /**
     * 错误码
     */
    private final int code;
    /**
     * 错误描述
     */
    private final String msg;

    ExceptionEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
